﻿<Page
    x:Class="Tuan.ItemPage"
    IsTabStop="false"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Tuan"
    xmlns:data="using:Tuan.Common"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Page.Resources>

        <!-- 此页所显示的项集合-->
        <CollectionViewSource
            x:Name="itemsViewSource"
            Source="{Binding Items}"
            d:Source="{Binding AllGroups[0].Items, Source={d:DesignInstance Type=data:SampleDataSource, IsDesignTimeCreatable=True}}"/>
    </Page.Resources>

    <Grid d:DataContext="{Binding AllGroups[0], Source={d:DesignInstance Type=data:SampleDataSource, IsDesignTimeCreatable=True}}">
        <Grid.Background>
            <ImageBrush ImageSource="Assets/bg04.jpg"/>
        </Grid.Background>
        <Grid.RowDefinitions>
            <RowDefinition Height="140"/>
            <RowDefinition Height="80"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="50"/>
        </Grid.RowDefinitions>

        <Grid Margin="10,-3,-10,3">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Button x:Name="backButton"  Click="backButton_Click_1" IsEnabled="{Binding Frame.CanGoBack, ElementName=pageRoot}" Style="{StaticResource BackButtonStyle}"/>
            <TextBlock x:Name="pageTitle" Text="团聚北京美食" Grid.Column="1" Style="{StaticResource PageHeaderTextStyle}" FontFamily="KaiTi"></TextBlock>
        </Grid>

        <Grid Grid.Row="1" Margin="100,10,0,0">
            <Grid.RowDefinitions>
                <RowDefinition Height="auto"></RowDefinition>
                <RowDefinition Height="auto"></RowDefinition>
            </Grid.RowDefinitions>
            <TextBlock x:Name="shortTitle" Text="便宜坊烤鸭店" Grid.Row="0" FontSize="25" Foreground="#FF1B52E6"></TextBlock>
            <TextBlock x:Name="title" Margin="0,10,0,0" Text="仅售268元,价值558元4人套餐!中华老字号,经典美食传承!膏肥皮脆,无穷回味!(另有售价518元8人套餐可选)" Grid.Row="1" FontSize="15" ></TextBlock>
        </Grid>
        <Grid Grid.Row="2" Margin="100,10,0,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="400"></ColumnDefinition>
                <ColumnDefinition Width="*"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <Grid Grid.Column="0" Margin="0,0,60,0">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"></RowDefinition>
                    <RowDefinition Height="Auto"></RowDefinition>
                    <RowDefinition Height="Auto"></RowDefinition>
                    <RowDefinition Height="Auto"></RowDefinition>
                    <RowDefinition Height="Auto"></RowDefinition>
                    <RowDefinition Height="Auto"></RowDefinition>
                    <RowDefinition Height="*"></RowDefinition>
                </Grid.RowDefinitions>
                <Grid Background="White" Grid.Row="0">
                    <Image Source="Assets/discount02.jpg" Width="110" Height="110" Margin="110,0,0,0"/>
                    <TextBlock x:Name="discount" Margin="100,40,0,0" Text="5.0" FontSize="50" Foreground="#FFF01010" FontWeight="Bold"/>
                </Grid>
                <StackPanel Background="White" Grid.Row="1">
                    <TextBlock x:Name="newprice" Margin="0,10,0,0" Text="¥268"  FontSize="40" HorizontalAlignment="Center" Foreground="#FFF51414" FontWeight="Bold" ></TextBlock>
                    <TextBlock x:Name="olderprice" Margin="0,10,0,0" Text="原价558" FontSize="25" HorizontalAlignment="Center" Foreground="#FF574444" FontWeight="Bold"></TextBlock>
                </StackPanel>
                <StackPanel Grid.Row="2" Height="150">
                    <Button Height="150" Width="350" HorizontalAlignment="Center">
                        <Button.Background>
                            <ImageBrush ImageSource="Assets/logo1.PNG"/>
                        </Button.Background>
                    </Button>
                </StackPanel>
                <StackPanel Background="DarkRed" Grid.Row="3">
                    <TextBlock x:Name="count" Margin="0,10,0,0" Text="948人已购买" FontSize="25" HorizontalAlignment="Center"></TextBlock>
                    <TextBlock x:Name="info" Margin="0,10,0,0" Text="团购数量有限，下单要快哟"  FontSize="18" HorizontalAlignment="Center"></TextBlock>
                </StackPanel>
                <StackPanel Background="DarkGreen" Grid.Row="4" Margin="0,5,0,0">
                    <TextBlock x:Name="deadline" Margin="0,10,0,10" Text="剩余时间  3天以上"  FontSize="15" HorizontalAlignment="Center"></TextBlock>
                </StackPanel>
            </Grid>

            <Grid Grid.Column="1">

                <StackPanel  Width="480"  HorizontalAlignment="Left"  VerticalAlignment="Top" Height="500">
                    <TextBlock Text="{Binding Title}" Margin="0,0,18,20" Style="{StaticResource SubheaderTextStyle}" MaxHeight="60"/>


                    <Canvas Width="400" Height="500" Background="White" >
                    <Canvas Width="250" Height="250" Canvas.Left="30" Canvas.Top="30" Background="blue" Canvas.ZIndex="4"></Canvas>
                    <Canvas>
                    <Rectangle Canvas.Left="30" Canvas.Top="30" Fill="red" Width="200" Height="200" Canvas.ZIndex="2" />
                    </Canvas>  
                    </Canvas>
                    



                        <TextBlock Text="{Binding Discription}" Margin="0,0,18,0" Style="{StaticResource BodyTextStyle}"/>
                </StackPanel>
            </Grid>
        </Grid>
    </Grid>
</Page>